# -*- coding: utf-8 -*-
# @File      :字符串下标
# @Author    :liaogan
# @Datetime  :2022/11/16 9:52

list=[4,6,8,1,3,5]
print(list[:2]) # 从开始到 2
print(list[:5]) #从下标0开始，到下标5结束 打印0.1.2.3.4
print(list[1:3]) #从下标1开始到3结束，不包含3 打印1,2

#
# list1=['a','b','c','d','e','f']
#
# def test(*args):
#     reslist=[]
#     for one in args:
#      reslist.append(list1.index(one))
#     return reslist
#
# if __name__ == '__main__':
#     print(test('e', 'a', 'c', 'b'))